package sigletondemo;

public class Test {

    public static void main(String[] args) {
        Singleton2 singleton1 = Singleton2.getInstance();

        Singleton2 singleton2 = Singleton2.getInstance();

        System.out.println(singleton1 == singleton2);


    }
    public static void main1(String[] args) {
        //Singleton singleton = new Singleton();

        Singleton singleton1 = Singleton.getInstance();

        Singleton singleton2 = Singleton.getInstance();

        System.out.println(singleton1 == singleton2);

    }
}
